<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class TWarnactset extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('t_warnactset', function (Blueprint $table) {
             $table->engine = 'MyISAM';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->increments('wa_id')->nullable(false)->comment('Add ID automatically');
			$table->string('wa_type', 20)->nullable()->default(null)->comment('');
			$table->integer('wa_gsmmode')->nullable(false)->default(0)->comment('SMS setting type: GEM Modem1,network 2');
			$table->integer('wa_com')->nullable()->default(0)->comment('Connection serial port');
			$table->integer('wa_baud')->nullable()->default(0)->comment('Baud rate');
			$table->string('wa_gsmServer', 100)->nullable()->default(null)->comment('SMS gateway');
			$table->string('wa_gsmusername', 200)->nullable()->default(null)->comment('User name');
			$table->string('wa_gsmpasswd', 200)->nullable()->default(null)->comment('Password');
			$table->string('wa_urlExt', 250)->nullable()->default(null)->comment('URL');
			$table->integer('wa_IsURL')->nullable()->default(0)->comment('');
			$table->integer('wa_gsmEnable')->nullable()->default(1)->comment('');
			$table->string('wa_SMTPserver', 250)->nullable()->default(null)->comment('SMTP address for E-mail warning ');
			$table->string('wa_emailbox', 250)->nullable()->default(null)->comment('Outbox address for E-mail warning');
			$table->integer('wa_check')->nullable()->default(0)->comment('Authentication for E-mail warning');
			$table->string('wa_emailusername', 250)->nullable()->default(null)->comment('User name for E-mail warning');
			$table->string('wa_emailpasswd', 250)->nullable()->default(null)->comment('Password for E-mail warning');
			$table->string('wa_SmsCenter', 100)->nullable()->default(null)->comment('SMS center');
			$table->integer('wa_emailEnable')->nullable()->default(0)->comment('');
			$table->boolean('wa_slEnable')->nullable(false)->default(0)->comment('Whether to enable light and sound warning');
			$table->integer('wa_slComPort')->nullable(false)->default(1)->comment('Serial port number for sound-light warning configuration');
			$table->boolean('wa_TSEnable')->nullable(false)->default(0)->comment('Whether to enable the voice dailing warning');
			$table->string('wa_09svrip', 48)->nullable()->default(null)->comment('');
			$table->integer('wa_09svrport')->nullable()->default(null)->comment('');
			$table->string('wa_sms_plat_type', 30)->nullable()->default(null)->comment('');
			$table->string('wa_sms_db_name', 20)->nullable()->default(null)->comment('');
			$table->integer('wa_VoiceEnable')->nullable()->default(0)->comment('');
			$table->integer('wa_VoiceTimes')->nullable()->default(3)->comment('');
			$table->string('wa_VoiceFile', 48)->nullable(false)->default('请先上传MP3格式的告警提示音文件!')->comment('');
			$table->integer('lig_sou_enable')->nullable(false)->default(0)->comment('');
			$table->string('lig_sou_ipaddr', 30)->nullable()->default('192.168.0.100')->comment('');
			$table->integer('lig_sou_autodisable')->nullable(false)->default(0)->comment('');
			$table->string('lig_sou_time', 30)->nullable()->default(2)->comment('');
			$table->integer('dt_webVer')->nullable()->default(0)->comment('');
			$table->integer('wa_VLTermID')->nullable()->default(null)->comment('');
			$table->integer('wa_SmsTermID')->nullable()->default(null)->comment('');
			$table->string('wa_SmsPlatURL', 100)->nullable()->default(null)->comment('');
			$table->string('wa_3DPlatURL', 100)->nullable()->default(null)->comment('');
			$table->integer('Co_ID')->nullable(false)->comment('');
			
        });

        
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('t_warnactset');
    }
}
